package com.bjpowernode.boss.mvc.model.query;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 客户信息 输入表单
 */
@Data
public class UserInfoQuery {
    // id
    private String id;

    // 登录名称
    @NotBlank(message = "登录名称不能为空")
    @Size(min = 5, max = 20,message = "登录名称字符在{min}-{max}之间")
    private String loginName;

    // 联系方式
    @NotBlank(message = "联系方式不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$" , message = "手机号格式错误")
    private String phone;

    // 商户名称
    @NotBlank(message = "商户名称不能为空")
    @Size(min = 5 , max = 20 , message = "商户名称字符在{min} - {max}之间")
    private String shopName;

    // 经营范围
    @NotBlank(message = "经营范围不能空")
    @Size(min = 10 , max = 200 , message = "经营范围字符在{min} - {max}之间")
    private String shopScope;

    // email
    @NotBlank(message = "联系邮箱不能空")
    @Email(message = "邮箱格式错误")
    private String userEmail;
}
